<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Alex
 * Created Time: 2019/7/1 14:46
 * Modified Time: 2019/7/1 14:46
 * Version: 2.0
 */
$api = app('Flower\Core\Routing\Router');
$api->version('v1', function ($api) {
    $api->group(['middleware' => ['api.auth','visitor.source'], 'providers' => ['wechat']], function ($api) {

	    // 小程序主页
	    $api->post('home_wx_page','App\Modules\Member\Controllers\MemberController@homeWxPage');

        // 获取店铺列表
        $api->post('get_store_list', 'App\Modules\Store\Controllers\StoreController@getStoreList');

		// 服务是否下架
        $api->post('service_is_off','App\Modules\Service\Controllers\ServiceController@isOff');



        //获取某店公告列表 Raghu 19-7-8
        $api->post('get_activity_list_page', 'App\Modules\Activity\Controllers\ActivityController@getActivityListPageWx');

        $api->post('get_order_list', 'App\Modules\Order\Controllers\OrderController@getList');

        //根据会员卡类id获取会员卡类信息 Raghu 19-7-1
        $api->post('get_card_type', 'App\Modules\MemberCard\Controllers\CardTypeController@getCardType');
        //用户申请会员卡 Raghu 19-7-1
        $api->post('apply_member_card', 'App\Modules\Cashier\Controllers\CashierController@createMemberCardBill');

        // 小程序获取理发师上班日程
        $api->post('get_schedule', 'App\Modules\Order\Controllers\OrderController@onDutyTime');

        // 小程序获取理发师某天预约时间列表
        $api->post('get_day_appointment', 'App\Modules\Order\Controllers\OrderController@dayAppointment');

	// 预约下单
	$api->post('appointment', 'App\Modules\Order\Controllers\OrderController@appointment');

        // 查询订单
        $api->post('search_order_list_wx', 'App\Modules\Order\Controllers\OrderController@searchOrderListWx');

        // 新增订单评论
        $api->post('order_comment', 'App\Modules\Order\Controllers\OrderController@orderComment');

        // 获取订单评论
        $api->post('get_order_comment', 'App\Modules\Order\Controllers\OrderController@getOrderComment');

        //删除订单评论deleteComment
//        $api->post('delete_order_comment', 'App\Modules\Order\Controllers\OrderController@deleteOrderComment');

        // 新增评论回复
        $api->post('add_order_comment_reply', 'App\Modules\Order\Controllers\OrderController@addOrderCommentReply');

        // 删除评论回复
        $api->post('del_order_comment_reply', 'App\Modules\Order\Controllers\OrderController@delOrderCommentReply');
        // 新增点赞回复
        $api->post('add_order_comment_like', 'App\Modules\Order\Controllers\OrderController@addOrderCommentLike');

        // 删除点赞回复
        $api->post('del_order_comment_like', 'App\Modules\Order\Controllers\OrderController@delOrderCommentLike');

        // 店铺访客数量记录
        $api->post('add_visitor', 'App\Modules\DataCenter\Controllers\StatisticsController@addVisitor');
        /**
         ** end
         **************************************/


        // 小程序路由
        $api->get('ttt', 'App\Modules\System\Controllers\TestController@test');

	    // 视频背景
//	    $api->post('get_appointment_bg', 'App\Modules\Employee\Controllers\PortfolioController@getAppointmentBg');
		// 用户是否关注理发师和点赞作品集
	    $api->post('get_appointment_bg', 'App\Modules\Employee\Controllers\PortfolioController@isLikeAndFollow');

        // 预约下单
        $api->post('appointment', 'App\Modules\Order\Controllers\OrderController@appointment');

        // 取消预约下单
        $api->post('cancel_appointment_wx', 'App\Modules\Order\Controllers\OrderController@cancelAppointmentWx');

        // 发起取消预约订单申请
	    $api->post('withdraw_wx', 'App\Modules\Order\Controllers\OrderController@withdrawWx');
        // 拒绝取消预约订单申请 
        $api->post('refuse_cancel_order_wx', 'App\Modules\Order\Controllers\OrderController@refusedCancelApply');
        // 撤回取消预约订单申请
        $api->post('destroy_cancel_order_wx', 'App\Modules\Order\Controllers\OrderController@destroyCancelApplyWx');
        // 同意取消预约订单申请
        $api->post('agree_cancel_order_wx', 'App\Modules\Order\Controllers\OrderController@agreeCancelApplyWx');
         // 读取拒绝取消预约订单申请的信息
        $api->post('read_cancel_order_wx', 'App\Modules\Order\Controllers\OrderController@readCancelReasonWx');

        // 获取预约列表
        $api->post('get_appointment_list', 'App\Modules\Order\Controllers\OrderController@getAppointmentList');

        $api->post('dynamic_like', 'App\Modules\Employee\Controllers\DynamicController@dynamicLike');

        // 首页推荐关注作品集

	    $api->post('get_new_like_portfolio', 'App\Modules\Employee\Controllers\PortfolioController@getNewLikePortfolio');
        // 查询作品集
        $api->post('get_portfolio_list', 'App\Modules\Employee\Controllers\PortfolioController@getPortfolioList');
        // 根据作品id获取作品
        $api->post('get_portfolio', 'App\Modules\Employee\Controllers\PortfolioController@getPortfolio');
        // 作品观看次数加1
        $api->post('set_inc_portfolio', 'App\Modules\Employee\Controllers\PortfolioController@setIncPortfolio');
        // 理发师详情页面
        $api->post('get_barber_info', 'App\Modules\Employee\Controllers\EmployeeController@getBarBerInfo')->middleware('visitor.barber');



        // 获取评论列表
	    $api->post('get_barber_list_comment', 'App\Modules\Employee\Controllers\EmployeeController@getBarberListComment');
        // 获取理发师服务列表
        $api->post('get_barber_service_list', 'App\Modules\Employee\Controllers\EmployeeController@getBarberServiceList');

	     // 评论查看人数次数加1
        $api->post('order_comment_view_times_set_inc', 'App\Modules\Order\Controllers\OrderController@orderCommentViewTimesSetInc');
        // 消费者的个人中心
        $api->post('get_member_info', 'App\Modules\Member\Controllers\MemberController@getMemberInfo');

		// isFirst
	    $api->post('get_is_first_login', 'App\Modules\Member\Controllers\MemberController@isFirst');

        // 消费者个人中心 人气店铺列表
        $api->post('get_most_popular_store', 'App\Modules\Member\Controllers\MemberController@getMostPopularStore');

        // 消费者个人中心 收藏作品集列表
        $api->post('get_like_portfolios', 'App\Modules\Member\Controllers\MemberController@getLikePortfolios');
        // 消费者个人中心  附近网红理发师
        $api->post('get_nearby_net_red_list', 'App\Modules\Member\Controllers\MemberController@getNearbyNetRedList');
        // 消费者个人中心 关注理发师
        $api->post('get_wx_like_barber_list', 'App\Modules\Member\Controllers\MemberController@getWxLikeBarberList');


        // 作品点赞
        $api->post('like_portfolio', 'App\Modules\Employee\Controllers\PortfolioController@likePortfolio');
        // 作品取消点赞
        $api->post('unlike_portfolio', 'App\Modules\Employee\Controllers\PortfolioController@unlikePortfolio');

        //获取视频动态列表 Raghu 19-7-11
        $api->post('get_video_dynamic_list', 'App\Modules\Employee\Controllers\DynamicController@getVideoDynamicList');


        //获取店铺首页信息 Raghu 19-7-17
        $api->post('get_store_photo_wx', 'App\Modules\Store\Controllers\StoreController@getStorePhoto');

        //用户关注店铺 Raghu 19-7-17
        $api->post('like_store', 'App\Modules\Store\Controllers\StoreController@likeStore');
        //用户关注理发师 Raghu 19-7-17
        $api->post('like_user', 'App\Modules\Employee\Controllers\EmployeeController@likeUser');
        //获取某店下所有理发师 Raghu 19-7-17
        $api->post('get_store_user_list', 'App\Modules\Employee\Controllers\EmployeeController@getStoreUserList');
        //获取某店下所有理发师发的动态 Raghu 19-7-18
        $api->post('get_store_dynamic_list', 'App\Modules\Employee\Controllers\DynamicController@getStoreDynamicList');

        //获取本人会员卡 Raghu 19-7-15
        $api->post('get_my_member_card_list', 'App\Modules\MemberCard\Controllers\MemberCardController@getMyMemberCardList');

        //获取本人关注店铺 Raghu 19-7-18
        $api->post('get_my_like_store_list', 'App\Modules\Store\Controllers\StoreController@getMyLikeStoreList');


        // 领取会员卡前发送短信验证码 Raghu 7-22
        $api->post('receive_member_card_send_sms', 'App\Modules\MemberCard\Controllers\MemberCardController@receiveMemberCardSendSms');

        //获取本人可领取的会员卡 Raghu 7-22
        $api->post('get_my_receive_member_card_list', 'App\Modules\MemberCard\Controllers\MemberCardController@getMyReceiveMemberCardList');
        //领取会员卡 Raghu 7-22
        $api->post('receive_member_card', 'App\Modules\MemberCard\Controllers\MemberCardController@receiveMemberCard');

        // 获取会员卡详细信息 Raghu 7-20
        $api->post('get_member_card_info', 'App\Modules\MemberCard\Controllers\MemberCardController@getMemberCardInfo');
        // 获取会员卡关联服务 Raghu 7-20
        $api->post('get_member_card_service_list', 'App\Modules\MemberCard\Controllers\MemberCardController@getMemberCardServiceList');
        //获取转移会员卡消费记录
        $api->post('get_member_card_flow','App\Modules\MemberCard\Controllers\MemberCardController@getMemberCardFlow');

        // 获取消息列表接口
        $api->post('get_wx_message_list', 'App\Modules\Message\Controllers\MessageController@getWxList');
        // 消息已读接口
        $api->post('read_wx_message', 'App\Modules\Message\Controllers\MessageController@readWxMessage');
	    // 全部消息已读接口
	    $api->post('read_all_wx_message', 'App\Modules\Message\Controllers\MessageController@readAllWxMessage');

	    // 抢红包接口
	    $api->post('pick_up_red_bag', 'App\Modules\RedBag\Controllers\RedBagMemberController@pickUp');

        // 我的积分
        $api->post('get_wx_coin_list', 'App\Modules\Member\Controllers\MemberController@getWxCoinList');
        $api->post('read_wx_message', 'App\Modules\Message\Controllers\MessageController@readWxMessage');

        // 获取用户县令币余额
        $api->post('get_member_coin_balance','App\Modules\Member\Controllers\MemberController@getMemberCoinBalance');

	    // 礼物列表
	    $api->post('get_gift_list','App\Modules\Gift\Controllers\GiftController@lst');
	    // 检测用户是否能发礼物checkMemberCanSendGift
	    $api->post('check_member_can_send_gift','App\Modules\Gift\Controllers\GiftController@checkMemberCanSendGift');
		// 用户发送礼物
	    $api->post('member_send_gift_to_barber','App\Modules\Gift\Controllers\GiftController@memberSendGift');

        //分享作品 Raghu 19-08-19
        $api->post('share_portfolio','App\Modules\System\Controllers\ShareController@sharePortfolio');
        //分享店铺 Raghu 19-08-20
        $api->post('share_store','App\Modules\System\Controllers\ShareController@shareStore');
        //分享活动 Raghu 19-08-20
        $api->post('share_activity','App\Modules\System\Controllers\ShareController@shareActivity');
        //分享理发师 Raghu 19-08-20
        $api->post('share_barber','App\Modules\System\Controllers\ShareController@shareBarber');

        //获取店铺首页信息 Raghu 19-7-17
        $api->post('get_store_info', 'App\Modules\Store\Controllers\StoreController@getStoreInfo');
        //获取公告详情 Raghu 19-8-18
        $api->post('get_activity', 'App\Modules\Activity\Controllers\ActivityController@getActivity');
		// 店铺详情优惠券
		$api->post('get_store_coupon_list','App\Modules\Coupon\Controllers\CouponMemberController@getStoreCouponList');

		// 分享送币
	    $api->post('send_spread_coin','App\Modules\Member\Controllers\MemberController@addCoinToMemberBySpread');

        //通过用户id获取用户昵称
        $api->post('get_member_nick', 'App\Modules\Live\Controllers\WxLiveController@getMemberNick');
        //用户进入直播间
        $api->post('add_live_member', 'App\Modules\Live\Controllers\WxLiveController@addLiveMember');
        //用户退出直播间
        $api->post('out_live_member', 'App\Modules\Live\Controllers\WxLiveController@outLiveMember');
        //用户点赞
        $api->post('create_live_ike', 'App\Modules\Live\Controllers\WxLiveController@createLiveLike');
        //用户取消点赞(弃用)
//        $api->post('update_live_like', 'App\Modules\Live\Controllers\WxLiveController@updateLiveLike');
        //用户关注
        $api->post('create_live_attention', 'App\Modules\Live\Controllers\WxLiveController@createLiveAttention');
        //用户取消关注
        $api->post('update_live_attention', 'App\Modules\Live\Controllers\WxLiveController@updateLiveAttention');
        //用户获取直播间相关信息
        $api->post('get_room_info', 'App\Modules\Live\Controllers\WxLiveController@getRoomInfo');
        //用户获取usersig
        $api->post('get_wx_sig', 'App\Modules\Live\Controllers\WxLiveController@getWxSig');
        //获取直播列表
        $api->post('get_live_list', 'App\Modules\Live\Controllers\WxLiveController@getLiveList');
        //获取分享二维码
        $api->post('get_qrcode', 'App\Modules\Live\Controllers\WxLiveController@getQrcode');
        //获取直播参数
        $api->post('get_live_message', 'App\Modules\Live\Controllers\WxLiveController@getLiveMessage');

	    // 小程序端检索理发师是否发优惠券
	    $api->post('get_check_is_send_coupon','App\Modules\Coupon\Controllers\CouponMemberController@checkHasCouponOut');
		// 领取优惠券
	    $api->post('pick_up_coupon','App\Modules\Coupon\Controllers\CouponMemberController@pickUpCoupon');

	    // 小程序端检索理发师是否发红包
	    $api->post('get_check_is_send_red_bag','App\Modules\RedBag\Controllers\RedBagMemberController@checkHasRedBag');
	    // 领取优惠券
	    $api->post('pick_up_coupon','App\Modules\Coupon\Controllers\CouponMemberController@pickUpCoupon');


	    // 用户领取的优惠券列表
	    $api->post('get_receive_coupon_list','App\Modules\Coupon\Controllers\CouponMemberController@getMemberCouponList');

	    // 直播间的优惠券列表
	    // 直播间的获取理发师发布优惠券列表
	    $api->post('get_coupon_to_member_list','App\Modules\Coupon\Controllers\CouponMemberController@getCouponList');
    });

    $api->group(['prefix' => 'common'], function ($api) {
        // 公共 不需要认证
        $api->post('wx_login', 'App\Modules\System\Controllers\AuthController@WxLogin');


        $api->post('get_live_list', 'App\Modules\Live\Controllers\WxLiveController@getLiveList');

	    // 小程序主页
	    $api->post('home_wx_page','App\Modules\Member\Controllers\MemberController@homeWxPageTourist');
//        $api->post('get_store_level_wx','App\Modules\Store\Controllers\StoreController@getStoreLevels');
    });
});
